<template>
  <div id="app">
    <!-- 导航栏 -->
    <nav class="navbar">
      <router-link to="/" exact-active-class="active">首页</router-link>
      <router-link to="/todolist" exact-active-class="active">ToDoList</router-link>
      <router-link to="/Profile" exact-active-class="active">个人简介</router-link>
    </nav>

    <!-- 卡片说明 -->
    <div class="info-card">
      📌 当前为 Hash 路由模式，点击上方导航栏可跳转页面。
    </div>

    <!-- 当前路由页面内容 -->
    <router-view />
  </div>
</template>

<script setup>
// 无逻辑
</script>

<style scoped>
#app {
  font-family: 'Comic Sans MS', 'Chalkboard', cursive;
  min-height: 90vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 导航栏样式 */
.navbar {
  background-color: white;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-radius: 10px;
  gap: 20px;
  margin-bottom: 20px;
}

.navbar a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: all 0.3s;
  padding: 5px 10px;
  border-radius: 6px;
}

.navbar a:hover {
  color: #ff6ec7;
  background-color: #ffe3f0;
}

.navbar a.active {
  color: #ff6ec7;
  border-bottom: 2px solid #ff6ec7;
  margin-top: 2px;
}

/* 小卡片样式 */
.info-card {
  background-color: #fff0f6;
  color: #ff4d94;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(255, 110, 199, 0.2);
  font-size: 16px;
  margin-bottom: 20px;
  animation: fadeIn 1s ease;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
</style>
